import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/pages/Login'
import Layout from '@/common/Layout'
import SysUser from '@/pages/user/Index'
import SysRole from '@/pages/role/Index'
import SysOrganization from '@/pages/organization/Index'
import Wechat from '@/pages/wechat/Wehcat'
import Deatil from '@/pages/detail/Detail'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },{
      path: '/sys',
      name: 'Layout',
      component: Layout,
      title: '系统管理',
      meta: {
        title: '系统管理'
      },
      children: [
          { path: 'user', component: SysUser, name: 'SysUser', meta: { title: "用户管理"}},
          { path: 'role', component: SysRole, name: 'SysRole', meta: { title: "角色管理" }},
          { path: 'organization', component: SysOrganization, name: 'SysOrganization', meta: { title: "角色管理" }},          
      ]
    },{
      path: '/wechat',
      name: 'Wechat',
      component: Wechat
    },{
      path: '/detail',
      name: 'Deatail',
      component: Deatil
    }
  ]
})
